package com.weitu.threeSimultaneities.projectApproval.service.impl;

import com.weitu.accessory.service.AccessoryUtilService;
import com.weitu.threeSimultaneities.projectApproval.entity.ProjectFSD;
import com.weitu.threeSimultaneities.projectApproval.mapper.ProjectFSDMapper;
import com.weitu.threeSimultaneities.projectApproval.service.ProjectFSDService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class ProjectFSDServiceImpl implements ProjectFSDService {
    @Autowired
    private ProjectFSDMapper projectFSDMapper;
    @Autowired
    private AccessoryUtilService accessoryUtilService;

    private static final Logger logger = LoggerFactory.getLogger(ProjectFSDServiceImpl.class);

    public ProjectFSD selectById(String id) {
        return this.projectFSDMapper.selectById(id);
    }

    public ProjectFSD selectByProjectApprovalId(String id) {
        return this.projectFSDMapper.selectByProjectApprovalId(id);
    }

    public int deleteByPrimaryKey(String id) {
        ProjectFSD projectFSD=this.selectByProjectApprovalId(id);
        int flag=1;
        if(projectFSD!=null){
            flag=this.projectFSDMapper.deleteByPrimaryKey(id);
        }
        return flag;
    }

    public int updateByPrimaryKeySelective(Map paramMap) {
        return this.projectFSDMapper.updateByPrimaryKeySelective(paramMap);
    }

    public int insertSelective(Map paramMap) {
        return this.projectFSDMapper.insertSelective(paramMap);
    }

}